﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CosmosKernel1;
namespace CosmosKernel1
{
    class Class1
    {
     
  
        
        public static void init()
        {
           
            Cosmos.Hardware.VGAScreen screen = new Cosmos.Hardware.VGAScreen();
            screen.SetGraphicsMode(Cosmos.Hardware.VGAScreen.ScreenSize.Size320x200,Cosmos.Hardware.VGAScreen.ColorDepth.BitDepth8);
            screen.SetPaletteEntry(1,255,255,255);
            screen.SetPaletteEntry(0, 0, 0, 0);
            screen.Clear(1);
            Cosmos.Hardware.Mouse mouse =new Cosmos.Hardware.Mouse();
            mouse.Initialize(320,200);
      uint y;
           uint x;
            uint oldy=0;

            uint oldx=0;

            while (true)
            {
                screen.SetPixel320x200x8(oldx+1, oldy, 1);
                screen.SetPixel320x200x8(oldx, oldy + 1, 1);
                screen.SetPixel320x200x8(oldx+1, oldy + 1, 1);
                screen.SetPixel320x200x8(oldx + 1, oldy+2, 1);
                x = (uint)mouse.X;
                y = (uint)mouse.Y;
                screen.SetPixel320x200x8(x+1, y, 0);
                screen.SetPixel320x200x8(x, y + 1, 0);
                screen.SetPixel320x200x8(x+1, y + 1, 0);
                screen.SetPixel320x200x8(x + 1, y+2, 0);





                oldx = x;
                oldy = y;


       

                //mouse - support!!!!!!!!





                //терперь идет главная часть


            }

         
        }
    }
}
